package app.netant.book.ting95;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class Ting95Root extends BaseRoot {
	
	public Ting95Root(){
		this.homeUrl = "https://www.ting95.com/mulu/3-1.html";
		this.pageUrl = "https://www.ting95.com/mulu/3-";
		this.tableKey = "ting95";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+".html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new Ting95Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new Ting95Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new Ting95Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		Ting95Root root = new Ting95Root();
		root.analyse(1297);
		//root.excepCycle();
	}


	
}
